app.service("goodsCategoryService",function ($http) {
    //查询所有分类
    this.findAll=function () {
        return $http.get("../goodsCategoryController/findAll.do");
    }
    //通过父级 id 查询
    this.findByParentId=function (parentId) {
        return $http.get("../goodsCategoryController/findByParentId.do?parentId=" + parentId);
    }
    //添加商品分类
    this.add=function (entity) {
        return $http.post("../goodsCategoryController/add.do",entity);
    }
    //查询商品分类详情
    this.findOne=function (id) {
        return $http.get("../goodsCategoryController/findOne.do?id="+id);
    }
    //修改商品分类信息
    this.update=function (entity) {
        return $http.post("../goodsCategoryController/update.do",entity);
    }

    this.delete=function (ids) {
        return $http.post("../goodsCategoryController/delete.do",ids);
    }
});